Repository navigation
feat(pm): landing-k, pr-state and sweep-closed-cards --pr replace three retyped landing reads - #35576
Conversation
…anding Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
… landing rules name Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
…ainst the body's closing keywords Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
…skips chain Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
… only Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
…re root literal Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CaAqjP52wVTzs99H5G L1: ACCEPT · area fleet-1 · 2026-11-19T16:04Z · head
Next: seat L2 at contract tier. Governed Tier S ( |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Read for this record: card #35237 (body, all seven comments, its timeline), PR #35576 (body, file list, its one comment), the net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
S1 (should-fix) — S2 (should-fix) — The drift pin for line 77 sits in the one self-test no blocking lane runs, and its failure switches off the label sweep. S3 (should-fix) — S4 (should-fix) — N1 (nit) — Exit 1 for a silent close is also this file's usage code, and Node's code for an uncaught throw. By the exit code alone a caller cannot tell the three apart. By the output it can: the verdict line names the cards, a usage error names the argument on stderr, and N2 (nit) — The new sweep battery is pinned at 13 and registers 14 cases, so one case, the phrase pin for instance, can stop registering with the floor still green. N3 (nit) — In N4 (nit) — N5 (nit) — N6 (nit) — When the PR row cannot be read, N7 (nit, prose) — Line 41 names N8 (nit) — The N9 (nit) — On an OPEN PR, Implemented-by: VERDICT: PASS |
…in, older reviews, queue contradictions - sweep-closed-cards --pr: a merge younger than MERGE_SETTLE_SECONDS (300 s) is UNJUDGED (exit 2) with the time to re-run, never the clean verdict; the silent close gets its own exit code, EXIT_SILENT_CLOSE = 4; the --pr battery floor matches its registered count; the line-77 phrase pin reads its file inside the harness, so a moved or split file fails the case instead of throwing. - check:pm-expected-skips now also runs sweep-closed-cards --self-test. - pr-state: reviewers whose newest review is on an older commit are printed with state and login, apart from the at-head ones, in the line and --json; a queue ref that contradicts the timeline's last queue event is a gap, so the run is INCOMPLETE (exit 4). - landing-k: diff base read from the selector step only. - landing-operations.md line 41 names landing-k as the reading of the any-K legs too (line count unchanged). Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G
|
repo:objectstack#5 · os-bill · session_01Utp6CaAqjP52wVTzs99H5G L1 delta after L2: ACCEPT · area fleet-1 · 2026-11-19T17:12Z · head
Next: the seat's L2 delta. |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta review of fix round 1, against the record on S1: closed No must-fix, no should-fix. ① Derived judgments
② Semver levelUnchanged from the first record: ③ Boundary flags
④ Design judgmentS1. S2. S3. S4. Both contradiction branches of N1. N2. The N7. Line 41 now reads 「挂 auto-merge/入队前读 K(PRBASE 至 origin/main 首父提交数)与任何 K 两腿,读
N10 (nit) — The N3, N4, N5, N6, N8 and N9 from the first record are unchanged in the tree; the L1 delta comment accepts them as recorded. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ 维护者速读
席位核对 — ACCEPT · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ 落地 — repo:objectstack#5 · head
|
| probe | reading |
|---|---|
| checks | every check-run on 2aa73313 success or skipped, none failing (the head contract-review delta d1 pins) |
| K | 11 first-parent commits on main since merge base b65488a8a9 (< 15) |
Governed .claude/**, Tier S, owning seat lands: security label, pr_ready + automerge_enable in this stroke. On MERGED, #35237 stays open; fleet-1 releases the remaining slices to seat 1 and clocks out.
Requested by Bill · project thread
Part of #35237
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
This is slice 2 of the card (landing reads): three readers replace three procedures that the landing and reporting rules spell as prose and that every landing seat retypes. Each prose line now names its reader and keeps its rule sentence.
scripts/pm/landing-k.mjs(new). Read-only,--pr N. It finds the PR'spull_requestruns ofci.yml(filtered by the PR's own commit shas, because a branch name is reused across PRs: live,claude/project-thread-w9aa30carries runs of two PRs), takes the newest completed run whoseTest Coreaggregate issuccess, reads one of itsTest Core (k/N)shard logs (or the planner's, which prints the same line) and parsesAffected-set diff base: SHA (why)as PRBASE. Diff base read from the selector step only: the line is taken from the job-log section that opens with theRun bash scripts/ci/select-shard-packages.shstep header; a log with no such step, no line in it, or more than one distinct base printed is exit 3. K =git rev-list --count --first-parent PRBASE..origin/main, after checking that the localorigin/mainis GitHub'smainand that PRBASE is an ancestor of it. Then the two any-K legs aslanding-operations.mdstates them: a new locale pack (a file added under atranslations/directory after PRBASE whose locale that directory did not hold at PRBASE) under a label PR (the PR file list read against the surface the two translation gates count: translation bundles,.form.tsmodules,packages/spec/src, examples and the packages that own an i18n extract config, from the sharedi18n-bundle-surface.mjswalk); and the two closed shared-budget books (input or ledger touched both by the PR and by main after PRBASE). Exits: 0 ok, 1 merge main first (each reason named), 2 usage, 3 can't answer. Fail closed: an expired or unreadable log, no green Test Core within the bound, a green run whose shards were all skipped (no line printed), a staleorigin/main, a PRBASE the clone cannot count from, or a PR file list shorter than the PR's count are each exit 3 with the gap named; an unread PRBASE yields no K and no verdict. A leg that already says merge decides exit 1 and the unread legs are still printed.scripts/pm/pr-state.mjs(new). Read-only,--pr N[,N…], one state line per PR: merged / draft /mergeable_state(an open PR'sunknownis re-read up to--rereadstimes, default 3, 3 s apart; still unknown is INCOMPLETE, never printed as a reading) / queue (membership from the timeline's lastadded_to_merge_queue/removed_from_merge_queue; the position from thegh-readonly-queuerefs, walked parent to tip from the base branch's current tip, read withgit ls-remote; a queue ref that contradicts the last queue event, with no event or after a removal, is printed and is a gap) / reviews (newest per reviewer: the ones on the head, and apart from them the ones newest on an older commit, each with state and login, because an APPROVED counts on any commit;--jsoncarries them asreviews_at_headandreviews_older) / checks at the head (every page offilter=latestcheck-runs, the count checked, judged withcheck-expected-skips.mjs's derived roster) / legacy commit status /auto_merge, tagged unreliable. Exits: 0 complete, 2 usage, 3 a PR row unreadable, 4 INCOMPLETE (a leg unread,mergeable_statestillunknown, or a queue ref contradicting the timeline).scripts/pm/sweep-closed-cards.mjs --pr N(new mode, report-only). For one merged PR: the closing-keyword targets in its body (the sharedclosingKeywordTargetsparser) against the issues the merge closed. Population: the issues the search API lists as closed in[merged_at − 60 s, merged_at + 600 s](count checked) plus every target. A close is tied to this merge when itsclosedevent or areferencedevent carries the merge commit, or when this PR cross-references it, no other PR whose body closes it merged in the window, and the close landed within 60 s of the merge. REST carries no closer field, so this tie is the reading. Live, on PR fix(core): drill a relationship path as one nested-relation condition, pushed down by the server #35423, the named target closed 4 s after the merge, and a folded card the seat closed by hand closed 112 s after it. A later close is listed as a hand close, with its actor. While the merge is younger thanMERGE_SETTLE_SECONDS(300 s) the run is UNJUDGED, exit 2, and prints the time to re-run; the clean verdict is never printed inside that window. Exits: 0 every card closed by the merge is a named target · 4 (EXIT_SILENT_CLOSE) a silent close, each card named · 2 inside the settle window, an unreadable candidate or a short search · 3 the PR is not merged or unreadable · 1 usage.--writeand--all-timebeside--prare refused. The closed-card sweep's own paths, options and exits are unchanged.package.json:check:pm-expected-skipsnow also runslanding-k.mjs --self-test,pr-state.mjs --self-testandsweep-closed-cards.mjs --self-test. No new CI job: the existing "Expected-skips roster self-test" step in the always-onLint · repo & tooling gateslane runs the chain, so all three drift pins (the K block, the per-look and status lines, and the silent-close line) go red on the PR that rewords them.landing-operations.md(112 → 112): the K line keeps K's definition in words and nameslanding-k.mjs --pr Nas the reading of K and of the two any-K legs below it. The shared-budget line drops the handgit diffspelling and keeps the rule. The silent-close line drops the hand inventory step, keeps the rule sentence and namessweep-closed-cards.mjs --pr N. The per-look line keeps "检查与mergeable_state" and "unknown重读" and namespr-state.mjs. Kept as written: the PRBASE line, the K ≥ 15 /behind/ locale line, the two-book line and the label definition.coordinator.md(51 → 51): the status line namespr-state.mjsand keeps the six facts.Fix round 1 (contract review of e9f241b)
sweep-closed-cards --prsettle window. New constantMERGE_SETTLE_SECONDS = 300(the 60 s auto-close bound plus four minutes for the search index). Younger merge ⇒ UNJUDGED, exit 2, the line names the re-run time (re-run at or after …). A silent close already readable inside the window is still the exit-4 alarm. Cases:⭐ a merge younger than the settle window is UNJUDGED, exit 2, with the time to re-run — never the clean verdict,the window closes at the bound,a silent close already readable inside the window is still the alarm, exit 4,a merge time that does not parse leaves the window unread.sweep-closed-cards.mjs --self-testis in thecheck:pm-expected-skipschain;check-self-test-wiredpasses. The pin'sreadFileSyncnow sits in atryinside the case: a moved or splitlanding-operations.mdfails that case with… could not be read (ENOENT) — moved or split?instead of throwing outside the harness.pr-stateolder-commit reviews. Printed with state and login, apart from the at-head ones, in the line (newest on an older commit: APPROVED m@dddddddddd (an APPROVED counts on any commit)) and in--json(reviews_older). Cases:⭐ approve, then a merge of main moves the head: the line still says who approved, never only a count,--json carries the older reviews apart from the at-head ones.pr-statequeue contradictions are gaps. BothqueueLegbranches (no queue event with a ref present; a removal with a ref present) return a gap, so the run is INCOMPLETE, exit 4. One case each.EXIT_SILENT_CLOSE = 4, named in the header, the verdict line and a self-test case that pins it apart from 0, 1, 2 and 3.--prbattery (19 = 19); the new and changed batteries inlanding-kandpr-stateare pinned at their registered counts too.landing-operations.mdnameslanding-kas the reading of the any-K legs on lines 43–46 (112 lines before and after, 119 bytes).landing-k(above). Cases:⭐ the diff base is read from the selector step only: a line another step printed is not read, exit 3,⭐ a log that prints two distinct diff bases is exit 3, neither read,the same base printed again outside the step still reads, from the selector step,⭐ a log with no selector step is exit 3, its line unread, and the drift pin⭐ ci.yml's planner and shard steps still open their run block with the selector.Tests
node scripts/pm/landing-k.mjs --self-test:✓ landing-k self-test: 47 cases pass across 7 batteries — offline, no network.Batteries are pinned by name with a floor, plus the handshake. They pin: PRBASE from the selector step of the shard log of the last green run on the PR's own commits (a newer green run on the same branch name but another PR's commit is never read; a red Test Core is skipped; the planner is read when no shard ran; a line from another step is not read; two distinct bases are exit 3); K at 14, 15 and 3; a staleorigin/main, a non-ancestor PRBASE and a missing PRBASE each exit 3; the locale leg (new pack under a label PR merges at K = 3, the same pack under a non-label PR is clear, an already-held locale is no new pack); the budget leg (same book on both sides merges, two different books never meet); every unread leg exit 3. Drift pins: the K block's phrases inlanding-operations.md, the lineselect-shard-packages.shechoes, the selector as the first line of the planner's and the shards'run:blocks, both ledgers' existence and the threeci.ymljob names.node scripts/pm/pr-state.mjs --self-test:✓ pr-state self-test: 36 cases pass across 6 batteries — offline, no network.They pin:unknownre-read until it settles and bounded, a merged PR never re-read; membership by the last queue event; position by the parent-tip chain; a ref that contradicts the timeline printed, not resolved, and INCOMPLETE; unlisted refs and an unreadable timeline are INCOMPLETE; reviews newest per reviewer at the head and, by state and login, on older commits; checks counted with expected and unexpected skips, every page, a count gap INCOMPLETE; the live roster derived from this checkout. Drift pins oncoordinator.md,landing-operations.mdand fivereadings-queue.mdphrases.node scripts/pm/sweep-closed-cards.mjs --self-test:✓ sweep-closed-cards self-test: 106 cases pass across 10 batteries. 19 are in the--prbattery, pinned at 19 (the battery floor rose 9 → 10). No case of the existing sweep was removed or changed.Acceptance notes
check-closing-keyword-parityflagged a cross-repo closing-keyword regex insweep-closed-cards.mjsas a fourth parser. It was removed, and the mode now reads targets only through the shared parser (other repositories' cards are named as unread).check:pm-dispatch-gatesflagged a bareexamples/literal inlanding-k.mjsas a new escapable-literal row. It is now a pattern (remedy (b): the reader predicates over PR paths and walks no root).Part of): the round health line; in-flight status and round-open; the deferredarea-lease.mdanddispatch-runbook.mdpointers;l1-face; the os-dev pointers.Verification
Live runs at head 2aa7331 (fix round 1), read-only
node scripts/pm/landing-k.mjs --pr 35576→ exit 0 (the diff base read from the selector step of a real shard log):(The verdict line is quoted with its less-than sign spelled out.)
node scripts/pm/pr-state.mjs --pr 35576,35482→ exit 0:node scripts/pm/sweep-closed-cards.mjs --pr 35423→ exit 0 (the merge is hours old, outside the settle window):#35447 was a folded card the seat closed by hand with a close-out comment. The first build of this mode read it as a silent close. That reading is why the 60 s bound exists.
Live runs at head e9f241b (before fix round 1)
node scripts/pm/landing-k.mjs --pr 35482→ exit 1:PRBASE 895dd437f4 (merge-base of origin/main and HEAD) — from Test Core (2/10) of run 44529574837,K = 20 … → merge main first,landing-k MERGE MAIN FIRST — K = 20 ≥ 15.node scripts/pm/sweep-closed-cards.mjs --pr 35482→ exit 0: its body carriesPart of, no closing keyword, and no card closed with it.Gates (local, head 2aa7331) and exits
pnpm check:pm-expected-skipsexit 0 (the chain now runs four self-tests);node scripts/check-self-test-wired.mjsexit 0;node scripts/pm/check-skill-line-ratchet.mjsexit 0;pnpm check:pm-governed-proseexit 0;pnpm check:pm-prior-rulingsexit 0.node scripts/pm/dispatch-gates.mjs --commandsexit 0, 52 families derived. Ran 52: 47 exit 0. 5 exit 3 PREREQUISITE NOT MET, read as NOT MEASURED because they need a builtdist/and this diff touches no workspace package:check:doc-formula-expressions,check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content. CI runs them on a built tree.dispatch-gates --ran:52 derived, 47 run, 5 NOT-MEASURED, 0 UNRUN, exit 0.check:pm-dispatch-gates:✓ dispatch-gates self-test (fast tier): 2249 cases pass.node scripts/pm/overlap-check.mjs→VERDICT clean exit 0(origin/main 83a79e6 merges cleanly; 0 open PR heads share a file).eslint --no-inline-configon the three scripts: exit 0.Ablations, fix round 1 (scripts/ablation-replace.mjs: the mutation proven on disk, restored to the HEAD blob)
Each leg: anchor hit once, blob changed, the self-test exit 1 with the named case red, then
ok restored: blob == HEAD … and git diff HEAD is empty.MERGE_SETTLE_SECONDS) replaced byfalseinjudgeMergeCloses→1 of 106 case(s) failed:✗ ⭐ a merge younger than the settle window is UNJUDGED … — ✓ every card closed by this merge is a named target. Exit 0.Restored to blob42474e895358.LANDING_OPERATIONS_PATHpointed at a missing file →1 of 106 case(s) failed:✗ ⭐ landing-operations.md still says the rule this mode reads … — … could not be read (ENOENT) — moved or split?; the harness reports it, nothing throws.EXIT_SILENT_CLOSE = 4set to 1 →✗ the silent close has its own exit code, apart from usage, unjudged and the unmet prerequisite.2 of 36 case(s) failed, including✗ ⭐ approve, then a merge of main moves the head: the line still says who approved, never only a count — got [0,false], want [0,true]. Restored to blobc223d9d860c2.✗ ⭐ a ref with no queue event on the timeline contradicts it: INCOMPLETE exit 4 — got [0,true,[]].✗ ⭐ a ref after the last event removed the PR contradicts the timeline … INCOMPLETE exit 4 — got [0,true,false], want [4,true,true].✗ ⭐ the diff base is read from the selector step only: a line another step printed is not read, exit 3 — got [0,{…}]. Restored to blob586699eb600f.✗ ⭐ a log that prints two distinct diff bases is exit 3, neither read — got [0,{…}].The first S4 attempt used a replacement (
}) that already occurred 207 times in the file; the tool refused it (a rise of 0, not the declared 1), restored the blob and ran nothing. Both legs were re-run as deletions, above.skip-changeset:scripts/pm/**,.claude/**and the rootpackage.jsonscript line publish nothing.Generated by Claude Code